UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'jprVXlJK4+3wS4B+rVluyLkWDNb96iKRT2oIwivw/7E='
WHERE
key_id = 'cb6213a4b191adf5d92e0a33f2a5524bbde630d618c01ddeb08c94751d34e8e5'
AND (
token = 'jprVXlJK4+3wS4B+rVluyLkWDNb96iKRT2oIwivw/7E='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)