UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'o0n1xAh0yLrM2rdGlxkUGoZ0PMc4eihlDyJKoK1X+eQ='
WHERE
key_id = '4283aac658e345d2f6fbb8f5a125aa6e735c0591f98fc1468c8ab8c1ef09b89f'
AND (
token = 'o0n1xAh0yLrM2rdGlxkUGoZ0PMc4eihlDyJKoK1X+eQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)