UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 's2yl0LGcg0357mY0sxG90NN0apRlyTrNBuZgFKbuNvI='
WHERE
key_id = '60a6c3034637ec1179054a12f5ca638968d96c406371c96124c855780046f521'
AND (
token = 's2yl0LGcg0357mY0sxG90NN0apRlyTrNBuZgFKbuNvI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)