UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'xp8888cMyJoaUPm+FQoW2UuFDXeT0PcqnsfnWngWjo0='
WHERE
key_id = 'f0fb28edb7487739b142ccbb61463d721c6c6dea9f955a39e49dc87b85e58fc5'
AND (
token = 'xp8888cMyJoaUPm+FQoW2UuFDXeT0PcqnsfnWngWjo0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)