UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'WN3r5WDOmaHVE/5Alfpieuw96rFHZUir77LR/lZsgEc='
WHERE
key_id = '727b617172d85f6e8f2e9abbe085e2cfb458ed7f285d28d2f285d0349d1d1027'
AND (
token = 'WN3r5WDOmaHVE/5Alfpieuw96rFHZUir77LR/lZsgEc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)