UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'gz21axW/I9iGh69QD4lKJBAZGQupCa5GbKRvZjsie6w='
WHERE
key_id = '84369e980454ec90db30195ed366393aebfffb7a6b69fe83955088ecafbeebb8'
AND (
token = 'gz21axW/I9iGh69QD4lKJBAZGQupCa5GbKRvZjsie6w='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)