UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'wxQ1TpPXnmHsD1fWXMKVWDTJLf7Ne5x1ot+o4f/5xSQ='
WHERE
key_id = '93085446e7b2b59adbc94487b7942959aadd296b6e046de2d7e24fc22ef05b33'
AND (
token = 'wxQ1TpPXnmHsD1fWXMKVWDTJLf7Ne5x1ot+o4f/5xSQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)