UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/mggRmAyATcvckRqzrS/dFJby1DXejTrst4JhwmlErA='
WHERE
key_id = 'a3961089d78190a88ea7ce161c10a3a89d68a272155c78814eea890684527142'
AND (
token = '/mggRmAyATcvckRqzrS/dFJby1DXejTrst4JhwmlErA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)