UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/UjurFfAHRrAOL/kaMAfweW4BJZ5+mpFv3J1r8jUt8k='
WHERE
key_id = 'bc11462f304d81b9492710ea00c055b1fbb63d1cb38eedc56201d862fcfd84c2'
AND (
token = '/UjurFfAHRrAOL/kaMAfweW4BJZ5+mpFv3J1r8jUt8k='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)