UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'uDpkenz8mqDesNwCY86wDXCrihXKIlN959W0BEPcG4I='
WHERE
key_id = 'ee1058b58aaeceaaa9a0bb9441699767d949ccc421f62ad034971805d4c45e3c'
AND (
token = 'uDpkenz8mqDesNwCY86wDXCrihXKIlN959W0BEPcG4I='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)