UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'MDB03KLePinZvRWo5hUESKvAd5mlx6XXcjXiApJELRs='
WHERE
key_id = '93ff019a600cb06b391a76507bb6294d76d449f9ded7ffdddc7c02a7cbfaed14'
AND (
token = 'MDB03KLePinZvRWo5hUESKvAd5mlx6XXcjXiApJELRs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)