UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '8bIul4n60Kivy19oettTbYjGF20GdSHLCzwF564sA1g='
WHERE
key_id = '1430010c95ea60772dcbcf3a1d1ffbbdc3cab5ddbbcd839be71d14d8af4e8bf0'
AND (
token = '8bIul4n60Kivy19oettTbYjGF20GdSHLCzwF564sA1g='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)