UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'U44/5C0D0m4jumrebI1fZPIOMtmmRzKd08BS0NBp8mo='
WHERE
key_id = '61703dbbb742e986bd58f3a02c17955a25d360d1e86fb6a37875101c88840744'
AND (
token = 'U44/5C0D0m4jumrebI1fZPIOMtmmRzKd08BS0NBp8mo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)