UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Fkn4VLGCzcqz9mEUjVkiafznkUEX3S2iuHuIcjyOUbE='
WHERE
key_id = 'acabe34f5ca89dd42615c041af3726452acf7693336af97997bf2909a0d75a81'
AND (
token = 'Fkn4VLGCzcqz9mEUjVkiafznkUEX3S2iuHuIcjyOUbE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)