UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '153OLPowuc6skltADP3pQNbu38FsZEpk/wwsrMAFVHU='
WHERE
key_id = 'bc13d37c22e0dfffbe7b98a108b01eca38e4704bab5d5ffb1b99163a7dc8e65b'
AND (
token = '153OLPowuc6skltADP3pQNbu38FsZEpk/wwsrMAFVHU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)