UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Dbhb+KLuJaAkFCzRl9wP9eshwmPnysriWWr/fqoIl7U='
WHERE
key_id = 'f2038ff2ca8912c6a025a6161353928455fad1b2992cc670220bb58a72b240ae'
AND (
token = 'Dbhb+KLuJaAkFCzRl9wP9eshwmPnysriWWr/fqoIl7U='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)