UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'w/ZgdMKQ+RALfK3h2qwJ+cY/Sl6WbGECQJPavcT79qw=' 
WHERE 
  key_id = '74c3ce3b7f3a23327972ddb840cb5c9dbe251fff1f246df5b31fb89ab6c68b04' 
  AND (
    token = 'w/ZgdMKQ+RALfK3h2qwJ+cY/Sl6WbGECQJPavcT79qw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00024