UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'iGUFIeBCjLUECHRzaPpbJG16e8pJl/YzDoPLQ0UdIR8='
WHERE
key_id = 'fed7279c77dab6e7d5508471aeb411782cc933ac0d666c0ece8bf2bb6bf4e496'
AND (
token = 'iGUFIeBCjLUECHRzaPpbJG16e8pJl/YzDoPLQ0UdIR8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)