UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/f5Y+YCBNNe7zEuYQv4B0L7AQchM8fT6NZJ4TP/psDc='
WHERE
key_id = '1d942811e11d0d9c7cd1183b6ca94b10555d5d1af28b13aa63a660e4c753bb00'
AND (
token = '/f5Y+YCBNNe7zEuYQv4B0L7AQchM8fT6NZJ4TP/psDc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)