UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/ignlpHxB8YNYRBX9BbwTpX+Xkld+RPYbB7IwVvs/Ww=' 
WHERE 
  key_id = '7c62b152fe075c8ca45f1013ab4536324346fcf88f931525a4b2ae79a84edcf2' 
  AND (
    token = '/ignlpHxB8YNYRBX9BbwTpX+Xkld+RPYbB7IwVvs/Ww=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027