UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'm2jCBoUUgn16X70qgEw+8ibTS7QR4BqfY2qCb+lDr/o='
WHERE
key_id = '357e8a294809aa5d335ab673f0dae5bffd3c513a2d48c16105f32330a2fb0f76'
AND (
token = 'm2jCBoUUgn16X70qgEw+8ibTS7QR4BqfY2qCb+lDr/o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)