UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'JQ6vwPah86Cz7FRsM5ufG8vCiQmqzbkrKLfzp91UBVA='
WHERE
key_id = '148b517187680e91f395dff6fdf5c7082548e323a2af335cb59da35120e1cf56'
AND (
token = 'JQ6vwPah86Cz7FRsM5ufG8vCiQmqzbkrKLfzp91UBVA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)