UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'l2nMuEzWZGKHnaglStOzmTpOr0iz2fW2/Wz5q673iX4='
WHERE
key_id = '4a0e60aacd3fe3afda4a946f304dbb61d91263d6c69919d6479af9d72554fd68'
AND (
token = 'l2nMuEzWZGKHnaglStOzmTpOr0iz2fW2/Wz5q673iX4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)