UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+URgH6F32m/P/iwfT7T7754jJc674jXnFD4TVRDKpNI='
WHERE
key_id = '9e9aba448dfdd8123527f0ab643fc0b3168eb1b11d2f5614192ac611496e5d1b'
AND (
token = '+URgH6F32m/P/iwfT7T7754jJc674jXnFD4TVRDKpNI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)