UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'qxdwS1JYrBYnaOAQtjep8NfP/CMo2SB5s5/wdjb+4BM='
WHERE
key_id = '2bcfaa86c660f01582a3221e2549ef55f056c8af5add38a336754829f0758a8c'
AND (
token = 'qxdwS1JYrBYnaOAQtjep8NfP/CMo2SB5s5/wdjb+4BM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)