UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'kk3hq+svn0K+4LK1iQgZXaFaC5u+oI15Gca21nkIIqw='
WHERE
key_id = '028d2e94eca8cf8b1fa28d94568838aa2f86e3b162062055605a504a8d092205'
AND (
token = 'kk3hq+svn0K+4LK1iQgZXaFaC5u+oI15Gca21nkIIqw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)