UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'uTy/g9noKlKcJ9GEd+O9u8ldKFkl88Iu/JhFsuoQcLA='
WHERE
key_id = '90c12ce32bf5865083ecebf0bfc2075f06c2620f8dff83572913ccd8eaafd95f'
AND (
token = 'uTy/g9noKlKcJ9GEd+O9u8ldKFkl88Iu/JhFsuoQcLA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)