UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'rKdETNgwsz8DJxEwoHhEXI/MOM/NAUSs5MLB0zA7uSQ=' 
WHERE 
  key_id = 'adb7e0d0ecbb90f787a70b66d4bab41b8bb84dfe8d9b112953998779b4b4aff3' 
  AND (
    token = 'rKdETNgwsz8DJxEwoHhEXI/MOM/NAUSs5MLB0zA7uSQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00032